$(function(){
	$(".order").click(function(){
		if(user){
			window.location.href="dindan.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$(".coup").click(function(){
		if(user){
			window.location.href="coupon.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$(".code").click(function(){
		if(user){
			window.location.href="code.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$(".follow").click(function(){
		if(user){
			window.location.href="userfollow.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$(".setup").click(function(){
		if(user){
			window.location.href="settings.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$(".head").click(function(){
		if(user){
			window.location.href="userdata.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$('.collection')[0].addEventListener('touchstart',function() {
		if(user){
			window.location.href="collection.html"
		}else{
			window.location.href="signin.html"
		}
	})
	$('.user').mobileClick(function(){
		if(user){
			window.location.href="collection.html"
		}else{
			window.location.href="signin.html"
		}
	})
	if(user){
		$('.userInfo').html(user);
	}else{
		$('.userInfo').html('点击此处登录/注册');
	}
})
